package mutsumimod.powers.deprecated;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;
import mutsumimod.monsters.FakeEnemyMonster;
import mutsumimod.powers.BasePower;

import static mutsumimod.MutsumiMod.makeID;

@Deprecated
public class FakeEnemyPower extends BasePower {
    public static final String POWER_ID = makeID(FakeEnemyPower.class.getSimpleName());
    private static final AbstractPower.PowerType TYPE = PowerType.DEBUFF;
    private static final boolean TURN_BASED = false;

    public FakeEnemyPower(AbstractCreature owner) {
        super(POWER_ID, TYPE, TURN_BASED, owner, 0);
    }

    public int onAttacked(DamageInfo info, int damageAmount) {
        if(info.type.equals(DamageInfo.DamageType.NORMAL)){
            for(AbstractMonster m : AbstractDungeon.getMonsters().monsters){
                if(!m.isDeadOrEscaped()&&!(m instanceof FakeEnemyMonster)){
                    addToBot(new DamageAction(m, new DamageInfo(AbstractDungeon.player
                            , damageAmount, DamageInfo.DamageType.THORNS), AbstractGameAction.AttackEffect.SLASH_VERTICAL));
                }
            }
        }
        return damageAmount;
    }

}
